<?php
/**
 *
 *
 * @author Zeon <scplay@gmail.com>
 * @date 2019/5/28 14:36
 * @copyright PanxSoft Inc.
 */

namespace App\Http\Controllers\App\V1;


use App\Http\Controllers\ApiController;
use App\Models\BulletinBoard;

class BulletinBoardController extends ApiController
{
    const ROUTES = [
        'index' => 'app.v1.bulletin-board.index',
    ];

    /**
     * 更新用户信息
     *
     *
     * @return array|\Illuminate\Http\Response
     */
    public function index()
    {
        $bulletin_board = (new BulletinBoard)
            ->oldest('sort_order')
            ->latest('created_at')
            ->filterLimitDate()
            ->first();

        return $this->response(compact('bulletin_board'));
    }
}